using System;
using System.Collections.Generic;
using System.Text;

namespace ControladorDifuso.Normas.T_Normas
{
    class Dombi:ControladorDifuso.Normas.Norma
    {
        private decimal lamda;

        public decimal Lamda
        {
            get
            {
                return this.lamda;
            }
            set
            {
                if (value > 0)
                    this.lamda = value;
            }
        }
        public override decimal calcular(decimal a, decimal b)
        {
            double ao = (double)a;
            double bo = (double)b;
            double lamda = (double)this.lamda;
            double suma1 = Math.Pow(1 / ao - 1, lamda);
            double suma2 = Math.Pow(1 / bo - 1, lamda);
            return (decimal)(1 + Math.Pow(Math.Pow(suma1 + suma2,1/lamda), -1));
        }

        public override string ToString()
        {
            return " y ";
        }
    }
}
